We need to update the visibility of the placeholder
label when we create it, otherwise we can end up
with placeholder text on top of entry content.
Fixes: #4066
if (priv->placeholder)
gtk_widget_set_child_visible (priv->placeholder,
priv->preedit_length == 0 &&
- gtk_entry_buffer_get_length (priv->buffer) == 0);
+ (priv->buffer == NULL ||
+ gtk_entry_buffer_get_length (priv->buffer) == 0));
}
/* GtkEntryBuffer signal handlers
gtk_label_set_text (GTK_LABEL (priv->placeholder), text);
}
+ update_placeholder_visibility (self);
+
g_object_notify_by_pspec (G_OBJECT (self), text_props[PROP_PLACEHOLDER_TEXT]);
}